using Microsoft.VisualBasic;
using Microsoft.VisualBasic.CompilerServices;
using SJVars;
using Spacejock;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Windows.Forms;
using yW5Lib;

namespace yWriter6
{
	[DesignerGenerated]
	internal class frmEditCharacter : Form
	{
		public delegate void FinishedEventHandler(bool Cancelled);

		private IContainer components;

		public ToolTip ToolTip1;

		[CompilerGenerated]
		[AccessedThroughProperty("txtNotes")]
		private RichTextBox _txtNotes;

		[CompilerGenerated]
		[AccessedThroughProperty("Picture1")]
		private PictureBox _Picture1;

		[CompilerGenerated]
		[AccessedThroughProperty("txtImageFile")]
		private TextBox _txtImageFile;

		[CompilerGenerated]
		[AccessedThroughProperty("cmdSelectImage")]
		private Button _cmdSelectImage;

		[CompilerGenerated]
		[AccessedThroughProperty("lblImageData")]
		private Label _lblImageData;

		[CompilerGenerated]
		[AccessedThroughProperty("Image2")]
		private PictureBox _Image2;

		[CompilerGenerated]
		[AccessedThroughProperty("txtGoals")]
		private RichTextBox _txtGoals;

		[CompilerGenerated]
		[AccessedThroughProperty("txtBio")]
		private RichTextBox _txtBio;

		[CompilerGenerated]
		[AccessedThroughProperty("txtTags")]
		private TextBox _txtTags;

		[CompilerGenerated]
		[AccessedThroughProperty("optMinor")]
		private RadioButton _optMinor;

		[CompilerGenerated]
		[AccessedThroughProperty("optMajor")]
		private RadioButton _optMajor;

		[CompilerGenerated]
		[AccessedThroughProperty("txtDesc")]
		private RichTextBox _txtDesc;

		[CompilerGenerated]
		[AccessedThroughProperty("txtAlternate")]
		private TextBox _txtAlternate;

		[CompilerGenerated]
		[AccessedThroughProperty("txtFullname")]
		private TextBox _txtFullname;

		[CompilerGenerated]
		[AccessedThroughProperty("txtShortName")]
		private TextBox _txtShortName;

		[CompilerGenerated]
		[AccessedThroughProperty("Label1")]
		private Label _Label1;

		[CompilerGenerated]
		[AccessedThroughProperty("Label6")]
		private Label _Label6;

		[CompilerGenerated]
		[AccessedThroughProperty("Label2")]
		private Label _Label2;

		[CompilerGenerated]
		[AccessedThroughProperty("Label4")]
		private Label _Label4;

		[CompilerGenerated]
		[AccessedThroughProperty("Label3")]
		private Label _Label3;

		[CompilerGenerated]
		[AccessedThroughProperty("cmdCancel")]
		private Button _cmdCancel;

		[CompilerGenerated]
		[AccessedThroughProperty("cmdSave")]
		private Button _cmdSave;

		[CompilerGenerated]
		[AccessedThroughProperty("Image1")]
		private PictureBox _Image1;

		[CompilerGenerated]
		[AccessedThroughProperty("TabControl1")]
		private TabControl _TabControl1;

		[CompilerGenerated]
		[AccessedThroughProperty("TabPage1")]
		private TabPage _TabPage1;

		[CompilerGenerated]
		[AccessedThroughProperty("TabPage2")]
		private TabPage _TabPage2;

		[CompilerGenerated]
		[AccessedThroughProperty("TabPage3")]
		private TabPage _TabPage3;

		[CompilerGenerated]
		[AccessedThroughProperty("TabPage4")]
		private TabPage _TabPage4;

		[CompilerGenerated]
		[AccessedThroughProperty("TabImage")]
		private TabPage _TabImage;

		[CompilerGenerated]
		[AccessedThroughProperty("cmdClearPic")]
		private Button _cmdClearPic;

		[CompilerGenerated]
		[AccessedThroughProperty("TableLayoutPanel1")]
		private TableLayoutPanel _TableLayoutPanel1;

		[CompilerGenerated]
		private FinishedEventHandler FinishedEvent;

		public bool Saved;

		private clsCharacter CurrentChar;

		private clsProject cProject;

		[field: AccessedThroughProperty("txtNotes")]
		public virtual RichTextBox txtNotes
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("Picture1")]
		public virtual PictureBox Picture1
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("txtImageFile")]
		public virtual TextBox txtImageFile
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		public virtual Button cmdSelectImage
		{
			[CompilerGenerated]
			get
			{
				return _cmdSelectImage;
			}
			[MethodImpl(MethodImplOptions.Synchronized)]
			[CompilerGenerated]
			set
			{
				EventHandler value2 = cmdSelectImage_Click;
				Button cmdSelectImage = _cmdSelectImage;
				if (cmdSelectImage != null)
				{
					cmdSelectImage.Click -= value2;
				}
				_cmdSelectImage = value;
				cmdSelectImage = _cmdSelectImage;
				if (cmdSelectImage != null)
				{
					cmdSelectImage.Click += value2;
				}
			}
		}

		[field: AccessedThroughProperty("lblImageData")]
		public virtual Label lblImageData
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		public virtual PictureBox Image2
		{
			[CompilerGenerated]
			get
			{
				return _Image2;
			}
			[MethodImpl(MethodImplOptions.Synchronized)]
			[CompilerGenerated]
			set
			{
				EventHandler value2 = Image2_Click;
				PictureBox image = _Image2;
				if (image != null)
				{
					image.Click -= value2;
				}
				_Image2 = value;
				image = _Image2;
				if (image != null)
				{
					image.Click += value2;
				}
			}
		}

		[field: AccessedThroughProperty("txtGoals")]
		public virtual RichTextBox txtGoals
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("txtBio")]
		public virtual RichTextBox txtBio
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("txtTags")]
		public virtual TextBox txtTags
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("optMinor")]
		public virtual RadioButton optMinor
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("optMajor")]
		public virtual RadioButton optMajor
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("txtDesc")]
		public virtual RichTextBox txtDesc
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("txtAlternate")]
		public virtual TextBox txtAlternate
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("txtFullname")]
		public virtual TextBox txtFullname
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("txtShortName")]
		public virtual TextBox txtShortName
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("Label1")]
		public virtual Label Label1
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("Label6")]
		public virtual Label Label6
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("Label2")]
		public virtual Label Label2
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("Label4")]
		public virtual Label Label4
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("Label3")]
		public virtual Label Label3
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		public virtual Button cmdCancel
		{
			[CompilerGenerated]
			get
			{
				return _cmdCancel;
			}
			[MethodImpl(MethodImplOptions.Synchronized)]
			[CompilerGenerated]
			set
			{
				EventHandler value2 = cmdCancel_Click;
				Button cmdCancel = _cmdCancel;
				if (cmdCancel != null)
				{
					cmdCancel.Click -= value2;
				}
				_cmdCancel = value;
				cmdCancel = _cmdCancel;
				if (cmdCancel != null)
				{
					cmdCancel.Click += value2;
				}
			}
		}

		public virtual Button cmdSave
		{
			[CompilerGenerated]
			get
			{
				return _cmdSave;
			}
			[MethodImpl(MethodImplOptions.Synchronized)]
			[CompilerGenerated]
			set
			{
				EventHandler value2 = cmdSave_Click;
				Button cmdSave = _cmdSave;
				if (cmdSave != null)
				{
					cmdSave.Click -= value2;
				}
				_cmdSave = value;
				cmdSave = _cmdSave;
				if (cmdSave != null)
				{
					cmdSave.Click += value2;
				}
			}
		}

		[field: AccessedThroughProperty("Image1")]
		public virtual PictureBox Image1
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("TabControl1")]
		internal virtual TabControl TabControl1
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("TabPage1")]
		internal virtual TabPage TabPage1
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("TabPage2")]
		internal virtual TabPage TabPage2
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("TabPage3")]
		internal virtual TabPage TabPage3
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("TabPage4")]
		internal virtual TabPage TabPage4
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("TabImage")]
		internal virtual TabPage TabImage
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		public virtual Button cmdClearPic
		{
			[CompilerGenerated]
			get
			{
				return _cmdClearPic;
			}
			[MethodImpl(MethodImplOptions.Synchronized)]
			[CompilerGenerated]
			set
			{
				EventHandler value2 = cmdClearPic_Click;
				Button cmdClearPic = _cmdClearPic;
				if (cmdClearPic != null)
				{
					cmdClearPic.Click -= value2;
				}
				_cmdClearPic = value;
				cmdClearPic = _cmdClearPic;
				if (cmdClearPic != null)
				{
					cmdClearPic.Click += value2;
				}
			}
		}

		[field: AccessedThroughProperty("TableLayoutPanel1")]
		internal virtual TableLayoutPanel TableLayoutPanel1
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		public event FinishedEventHandler Finished
		{
			[CompilerGenerated]
			add
			{
				FinishedEventHandler finishedEventHandler = FinishedEvent;
				FinishedEventHandler finishedEventHandler2;
				do
				{
					finishedEventHandler2 = finishedEventHandler;
					FinishedEventHandler value2 = (FinishedEventHandler)Delegate.Combine(finishedEventHandler2, value);
					finishedEventHandler = Interlocked.CompareExchange(ref FinishedEvent, value2, finishedEventHandler2);
				}
				while ((object)finishedEventHandler != finishedEventHandler2);
			}
			[CompilerGenerated]
			remove
			{
				FinishedEventHandler finishedEventHandler = FinishedEvent;
				FinishedEventHandler finishedEventHandler2;
				do
				{
					finishedEventHandler2 = finishedEventHandler;
					FinishedEventHandler value2 = (FinishedEventHandler)Delegate.Remove(finishedEventHandler2, value);
					finishedEventHandler = Interlocked.CompareExchange(ref FinishedEvent, value2, finishedEventHandler2);
				}
				while ((object)finishedEventHandler != finishedEventHandler2);
			}
		}

		[DebuggerNonUserCode]
		protected override void Dispose(bool Disposing)
		{
			if (Disposing && components != null)
			{
				components.Dispose();
			}
			base.Dispose(Disposing);
		}

		[System.Diagnostics.DebuggerStepThrough]
		private void InitializeComponent()
		{
			components = new System.ComponentModel.Container();
			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(yWriter6.frmEditCharacter));
			ToolTip1 = new System.Windows.Forms.ToolTip(components);
			cmdSelectImage = new System.Windows.Forms.Button();
			optMinor = new System.Windows.Forms.RadioButton();
			optMajor = new System.Windows.Forms.RadioButton();
			txtAlternate = new System.Windows.Forms.TextBox();
			txtShortName = new System.Windows.Forms.TextBox();
			txtNotes = new System.Windows.Forms.RichTextBox();
			Picture1 = new System.Windows.Forms.PictureBox();
			txtImageFile = new System.Windows.Forms.TextBox();
			lblImageData = new System.Windows.Forms.Label();
			Image2 = new System.Windows.Forms.PictureBox();
			txtGoals = new System.Windows.Forms.RichTextBox();
			txtBio = new System.Windows.Forms.RichTextBox();
			txtTags = new System.Windows.Forms.TextBox();
			txtDesc = new System.Windows.Forms.RichTextBox();
			txtFullname = new System.Windows.Forms.TextBox();
			Label1 = new System.Windows.Forms.Label();
			Label6 = new System.Windows.Forms.Label();
			Label2 = new System.Windows.Forms.Label();
			Label4 = new System.Windows.Forms.Label();
			Label3 = new System.Windows.Forms.Label();
			cmdCancel = new System.Windows.Forms.Button();
			cmdSave = new System.Windows.Forms.Button();
			Image1 = new System.Windows.Forms.PictureBox();
			TabControl1 = new System.Windows.Forms.TabControl();
			TabPage1 = new System.Windows.Forms.TabPage();
			TableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
			TabPage2 = new System.Windows.Forms.TabPage();
			TabPage3 = new System.Windows.Forms.TabPage();
			TabPage4 = new System.Windows.Forms.TabPage();
			TabImage = new System.Windows.Forms.TabPage();
			cmdClearPic = new System.Windows.Forms.Button();
			((System.ComponentModel.ISupportInitialize)Picture1).BeginInit();
			((System.ComponentModel.ISupportInitialize)Image2).BeginInit();
			((System.ComponentModel.ISupportInitialize)Image1).BeginInit();
			TabControl1.SuspendLayout();
			TabPage1.SuspendLayout();
			TableLayoutPanel1.SuspendLayout();
			TabPage2.SuspendLayout();
			TabPage3.SuspendLayout();
			TabPage4.SuspendLayout();
			TabImage.SuspendLayout();
			SuspendLayout();
			cmdSelectImage.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right);
			cmdSelectImage.BackColor = System.Drawing.SystemColors.Control;
			cmdSelectImage.Cursor = System.Windows.Forms.Cursors.Default;
			cmdSelectImage.Font = new System.Drawing.Font("Segoe UI", 10f);
			cmdSelectImage.ForeColor = System.Drawing.SystemColors.ControlText;
			cmdSelectImage.Location = new System.Drawing.Point(426, 7);
			cmdSelectImage.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			cmdSelectImage.Name = "cmdSelectImage";
			cmdSelectImage.RightToLeft = System.Windows.Forms.RightToLeft.No;
			cmdSelectImage.Size = new System.Drawing.Size(78, 41);
			cmdSelectImage.TabIndex = 22;
			cmdSelectImage.Text = "Select";
			ToolTip1.SetToolTip(cmdSelectImage, "I recommend a size no larger than 300-400 pixels wide. Huge images will be slow to load and should be resampled first.");
			cmdSelectImage.UseVisualStyleBackColor = true;
			optMinor.AutoSize = true;
			optMinor.BackColor = System.Drawing.Color.Transparent;
			optMinor.Cursor = System.Windows.Forms.Cursors.Default;
			optMinor.Font = new System.Drawing.Font("Segoe UI", 10f);
			optMinor.ForeColor = System.Drawing.SystemColors.ControlText;
			optMinor.Location = new System.Drawing.Point(439, 4);
			optMinor.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			optMinor.Name = "optMinor";
			optMinor.RightToLeft = System.Windows.Forms.RightToLeft.No;
			optMinor.Size = new System.Drawing.Size(64, 23);
			optMinor.TabIndex = 2;
			optMinor.TabStop = true;
			optMinor.Text = "Minor";
			ToolTip1.SetToolTip(optMinor, "This is a minor (less important) character");
			optMinor.UseVisualStyleBackColor = false;
			optMajor.AutoSize = true;
			optMajor.BackColor = System.Drawing.Color.Transparent;
			optMajor.Checked = true;
			optMajor.Cursor = System.Windows.Forms.Cursors.Default;
			optMajor.Font = new System.Drawing.Font("Segoe UI", 10f);
			optMajor.ForeColor = System.Drawing.SystemColors.ControlText;
			optMajor.Location = new System.Drawing.Point(370, 4);
			optMajor.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			optMajor.Name = "optMajor";
			optMajor.RightToLeft = System.Windows.Forms.RightToLeft.No;
			optMajor.Size = new System.Drawing.Size(63, 23);
			optMajor.TabIndex = 1;
			optMajor.TabStop = true;
			optMajor.Text = "Major";
			ToolTip1.SetToolTip(optMajor, "This is a major (important) character");
			optMajor.UseVisualStyleBackColor = false;
			txtAlternate.AcceptsReturn = true;
			txtAlternate.AccessibleDescription = "Alternative names";
			txtAlternate.BackColor = System.Drawing.SystemColors.Window;
			TableLayoutPanel1.SetColumnSpan(txtAlternate, 3);
			txtAlternate.Cursor = System.Windows.Forms.Cursors.IBeam;
			txtAlternate.Dock = System.Windows.Forms.DockStyle.Fill;
			txtAlternate.Font = new System.Drawing.Font("Segoe UI", 10f);
			txtAlternate.ForeColor = System.Drawing.SystemColors.WindowText;
			txtAlternate.Location = new System.Drawing.Point(94, 70);
			txtAlternate.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			txtAlternate.MaxLength = 0;
			txtAlternate.Name = "txtAlternate";
			txtAlternate.RightToLeft = System.Windows.Forms.RightToLeft.No;
			txtAlternate.Size = new System.Drawing.Size(409, 25);
			txtAlternate.TabIndex = 4;
			ToolTip1.SetToolTip(txtAlternate, "Case sensitive. Separate with ;");
			txtShortName.AcceptsReturn = true;
			txtShortName.AccessibleDescription = "Short name";
			txtShortName.BackColor = System.Drawing.SystemColors.Window;
			txtShortName.Cursor = System.Windows.Forms.Cursors.IBeam;
			txtShortName.Dock = System.Windows.Forms.DockStyle.Fill;
			txtShortName.Font = new System.Drawing.Font("Segoe UI", 10f);
			txtShortName.ForeColor = System.Drawing.SystemColors.WindowText;
			txtShortName.Location = new System.Drawing.Point(94, 4);
			txtShortName.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			txtShortName.MaxLength = 0;
			txtShortName.Name = "txtShortName";
			txtShortName.RightToLeft = System.Windows.Forms.RightToLeft.No;
			txtShortName.Size = new System.Drawing.Size(270, 25);
			txtShortName.TabIndex = 0;
			ToolTip1.SetToolTip(txtShortName, "If you change a character's name the old character will remain until deleted.");
			txtNotes.AcceptsTab = true;
			txtNotes.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right);
			txtNotes.BackColor = System.Drawing.SystemColors.Window;
			txtNotes.Cursor = System.Windows.Forms.Cursors.IBeam;
			txtNotes.Font = new System.Drawing.Font("Segoe UI", 10f);
			txtNotes.ForeColor = System.Drawing.SystemColors.WindowText;
			txtNotes.Location = new System.Drawing.Point(7, 7);
			txtNotes.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			txtNotes.MaxLength = 0;
			txtNotes.Name = "txtNotes";
			txtNotes.RightToLeft = System.Windows.Forms.RightToLeft.No;
			txtNotes.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
			txtNotes.Size = new System.Drawing.Size(496, 330);
			txtNotes.TabIndex = 10;
			txtNotes.Text = "";
			Picture1.BackColor = System.Drawing.SystemColors.Control;
			Picture1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			Picture1.Cursor = System.Windows.Forms.Cursors.Default;
			Picture1.Font = new System.Drawing.Font("Arial", 8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
			Picture1.ForeColor = System.Drawing.SystemColors.ControlText;
			Picture1.Location = new System.Drawing.Point(7, 7);
			Picture1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			Picture1.Name = "Picture1";
			Picture1.RightToLeft = System.Windows.Forms.RightToLeft.No;
			Picture1.Size = new System.Drawing.Size(62, 49);
			Picture1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
			Picture1.TabIndex = 24;
			Picture1.TabStop = false;
			Picture1.Visible = false;
			txtImageFile.AcceptsReturn = true;
			txtImageFile.BackColor = System.Drawing.SystemColors.Window;
			txtImageFile.Cursor = System.Windows.Forms.Cursors.IBeam;
			txtImageFile.Font = new System.Drawing.Font("Arial", 8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
			txtImageFile.ForeColor = System.Drawing.SystemColors.WindowText;
			txtImageFile.Location = new System.Drawing.Point(101, 39);
			txtImageFile.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			txtImageFile.MaxLength = 0;
			txtImageFile.Name = "txtImageFile";
			txtImageFile.RightToLeft = System.Windows.Forms.RightToLeft.No;
			txtImageFile.Size = new System.Drawing.Size(168, 20);
			txtImageFile.TabIndex = 23;
			txtImageFile.Visible = false;
			lblImageData.BackColor = System.Drawing.SystemColors.Control;
			lblImageData.Cursor = System.Windows.Forms.Cursors.Default;
			lblImageData.Font = new System.Drawing.Font("Arial", 8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
			lblImageData.ForeColor = System.Drawing.SystemColors.ControlText;
			lblImageData.Location = new System.Drawing.Point(98, 85);
			lblImageData.Name = "lblImageData";
			lblImageData.RightToLeft = System.Windows.Forms.RightToLeft.No;
			lblImageData.Size = new System.Drawing.Size(122, 23);
			lblImageData.TabIndex = 25;
			lblImageData.Visible = false;
			Image2.Cursor = System.Windows.Forms.Cursors.Default;
			Image2.Location = new System.Drawing.Point(7, 74);
			Image2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			Image2.Name = "Image2";
			Image2.Size = new System.Drawing.Size(76, 60);
			Image2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
			Image2.TabIndex = 26;
			Image2.TabStop = false;
			txtGoals.AcceptsTab = true;
			txtGoals.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right);
			txtGoals.BackColor = System.Drawing.SystemColors.Window;
			txtGoals.Cursor = System.Windows.Forms.Cursors.IBeam;
			txtGoals.Font = new System.Drawing.Font("Segoe UI", 10f);
			txtGoals.ForeColor = System.Drawing.SystemColors.WindowText;
			txtGoals.Location = new System.Drawing.Point(7, 7);
			txtGoals.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			txtGoals.MaxLength = 0;
			txtGoals.Name = "txtGoals";
			txtGoals.RightToLeft = System.Windows.Forms.RightToLeft.No;
			txtGoals.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
			txtGoals.Size = new System.Drawing.Size(496, 330);
			txtGoals.TabIndex = 11;
			txtGoals.Text = "";
			txtBio.AcceptsTab = true;
			txtBio.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right);
			txtBio.BackColor = System.Drawing.SystemColors.Window;
			txtBio.Cursor = System.Windows.Forms.Cursors.IBeam;
			txtBio.Font = new System.Drawing.Font("Segoe UI", 10f);
			txtBio.ForeColor = System.Drawing.SystemColors.WindowText;
			txtBio.Location = new System.Drawing.Point(7, 7);
			txtBio.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			txtBio.MaxLength = 0;
			txtBio.Name = "txtBio";
			txtBio.RightToLeft = System.Windows.Forms.RightToLeft.No;
			txtBio.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
			txtBio.Size = new System.Drawing.Size(496, 330);
			txtBio.TabIndex = 9;
			txtBio.Text = "";
			txtTags.AcceptsReturn = true;
			txtTags.AccessibleDescription = "Tags";
			txtTags.BackColor = System.Drawing.SystemColors.Window;
			TableLayoutPanel1.SetColumnSpan(txtTags, 3);
			txtTags.Cursor = System.Windows.Forms.Cursors.IBeam;
			txtTags.Dock = System.Windows.Forms.DockStyle.Fill;
			txtTags.Font = new System.Drawing.Font("Segoe UI", 10f);
			txtTags.ForeColor = System.Drawing.SystemColors.WindowText;
			txtTags.Location = new System.Drawing.Point(94, 305);
			txtTags.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			txtTags.MaxLength = 0;
			txtTags.Name = "txtTags";
			txtTags.RightToLeft = System.Windows.Forms.RightToLeft.No;
			txtTags.Size = new System.Drawing.Size(409, 25);
			txtTags.TabIndex = 6;
			txtDesc.AcceptsTab = true;
			txtDesc.AccessibleDescription = "Description";
			txtDesc.BackColor = System.Drawing.SystemColors.Window;
			TableLayoutPanel1.SetColumnSpan(txtDesc, 3);
			txtDesc.Cursor = System.Windows.Forms.Cursors.IBeam;
			txtDesc.Dock = System.Windows.Forms.DockStyle.Fill;
			txtDesc.Font = new System.Drawing.Font("Segoe UI", 10f);
			txtDesc.ForeColor = System.Drawing.SystemColors.WindowText;
			txtDesc.Location = new System.Drawing.Point(94, 103);
			txtDesc.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			txtDesc.MaxLength = 0;
			txtDesc.Name = "txtDesc";
			txtDesc.RightToLeft = System.Windows.Forms.RightToLeft.No;
			txtDesc.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
			txtDesc.Size = new System.Drawing.Size(409, 194);
			txtDesc.TabIndex = 5;
			txtDesc.Text = "";
			txtFullname.AcceptsReturn = true;
			txtFullname.AccessibleDescription = "Full Name";
			txtFullname.BackColor = System.Drawing.SystemColors.Window;
			TableLayoutPanel1.SetColumnSpan(txtFullname, 3);
			txtFullname.Cursor = System.Windows.Forms.Cursors.IBeam;
			txtFullname.Dock = System.Windows.Forms.DockStyle.Fill;
			txtFullname.Font = new System.Drawing.Font("Segoe UI", 10f);
			txtFullname.ForeColor = System.Drawing.SystemColors.WindowText;
			txtFullname.Location = new System.Drawing.Point(94, 37);
			txtFullname.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			txtFullname.MaxLength = 0;
			txtFullname.Name = "txtFullname";
			txtFullname.RightToLeft = System.Windows.Forms.RightToLeft.No;
			txtFullname.Size = new System.Drawing.Size(409, 25);
			txtFullname.TabIndex = 3;
			Label1.AutoSize = true;
			Label1.BackColor = System.Drawing.Color.Transparent;
			Label1.Cursor = System.Windows.Forms.Cursors.Default;
			Label1.Dock = System.Windows.Forms.DockStyle.Fill;
			Label1.Font = new System.Drawing.Font("Segoe UI", 10f);
			Label1.ForeColor = System.Drawing.SystemColors.ControlText;
			Label1.Location = new System.Drawing.Point(3, 301);
			Label1.Name = "Label1";
			Label1.RightToLeft = System.Windows.Forms.RightToLeft.No;
			Label1.Size = new System.Drawing.Size(85, 33);
			Label1.TabIndex = 29;
			Label1.Text = "Tags:";
			Label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			Label6.AutoSize = true;
			Label6.BackColor = System.Drawing.Color.Transparent;
			Label6.Cursor = System.Windows.Forms.Cursors.Default;
			Label6.Dock = System.Windows.Forms.DockStyle.Fill;
			Label6.Font = new System.Drawing.Font("Segoe UI", 10f);
			Label6.ForeColor = System.Drawing.SystemColors.ControlText;
			Label6.Location = new System.Drawing.Point(3, 99);
			Label6.Name = "Label6";
			Label6.Padding = new System.Windows.Forms.Padding(0, 6, 0, 0);
			Label6.RightToLeft = System.Windows.Forms.RightToLeft.No;
			Label6.Size = new System.Drawing.Size(85, 202);
			Label6.TabIndex = 17;
			Label6.Text = "Description:";
			Label6.TextAlign = System.Drawing.ContentAlignment.TopRight;
			Label2.AutoSize = true;
			Label2.BackColor = System.Drawing.Color.Transparent;
			Label2.Cursor = System.Windows.Forms.Cursors.Default;
			Label2.Dock = System.Windows.Forms.DockStyle.Fill;
			Label2.Font = new System.Drawing.Font("Segoe UI", 10f);
			Label2.ForeColor = System.Drawing.SystemColors.ControlText;
			Label2.Location = new System.Drawing.Point(3, 66);
			Label2.Name = "Label2";
			Label2.RightToLeft = System.Windows.Forms.RightToLeft.No;
			Label2.Size = new System.Drawing.Size(85, 33);
			Label2.TabIndex = 8;
			Label2.Text = "Alternates:";
			Label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			Label4.AutoSize = true;
			Label4.BackColor = System.Drawing.Color.Transparent;
			Label4.Cursor = System.Windows.Forms.Cursors.Default;
			Label4.Dock = System.Windows.Forms.DockStyle.Fill;
			Label4.Font = new System.Drawing.Font("Segoe UI", 10f);
			Label4.ForeColor = System.Drawing.SystemColors.ControlText;
			Label4.Location = new System.Drawing.Point(3, 33);
			Label4.Name = "Label4";
			Label4.RightToLeft = System.Windows.Forms.RightToLeft.No;
			Label4.Size = new System.Drawing.Size(85, 33);
			Label4.TabIndex = 7;
			Label4.Text = "Full Name:";
			Label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			Label3.AutoSize = true;
			Label3.BackColor = System.Drawing.Color.Transparent;
			Label3.Cursor = System.Windows.Forms.Cursors.Default;
			Label3.Dock = System.Windows.Forms.DockStyle.Fill;
			Label3.Font = new System.Drawing.Font("Segoe UI", 10f);
			Label3.ForeColor = System.Drawing.SystemColors.ControlText;
			Label3.Location = new System.Drawing.Point(3, 0);
			Label3.Name = "Label3";
			Label3.RightToLeft = System.Windows.Forms.RightToLeft.No;
			Label3.Size = new System.Drawing.Size(85, 33);
			Label3.TabIndex = 6;
			Label3.Text = "Short Name:";
			Label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			cmdCancel.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left);
			cmdCancel.BackColor = System.Drawing.SystemColors.Control;
			cmdCancel.Cursor = System.Windows.Forms.Cursors.Default;
			cmdCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			cmdCancel.Font = new System.Drawing.Font("Segoe UI", 10f);
			cmdCancel.ForeColor = System.Drawing.SystemColors.ControlText;
			cmdCancel.Location = new System.Drawing.Point(47, 398);
			cmdCancel.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			cmdCancel.Name = "cmdCancel";
			cmdCancel.RightToLeft = System.Windows.Forms.RightToLeft.No;
			cmdCancel.Size = new System.Drawing.Size(112, 50);
			cmdCancel.TabIndex = 7;
			cmdCancel.Text = "Cancel";
			cmdCancel.UseVisualStyleBackColor = true;
			cmdSave.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);
			cmdSave.BackColor = System.Drawing.SystemColors.Control;
			cmdSave.Cursor = System.Windows.Forms.Cursors.Default;
			cmdSave.Font = new System.Drawing.Font("Segoe UI", 10f);
			cmdSave.ForeColor = System.Drawing.SystemColors.ControlText;
			cmdSave.Location = new System.Drawing.Point(458, 398);
			cmdSave.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			cmdSave.Name = "cmdSave";
			cmdSave.RightToLeft = System.Windows.Forms.RightToLeft.No;
			cmdSave.Size = new System.Drawing.Size(104, 50);
			cmdSave.TabIndex = 8;
			cmdSave.Text = "OK";
			cmdSave.UseVisualStyleBackColor = true;
			Image1.Cursor = System.Windows.Forms.Cursors.Default;
			Image1.Location = new System.Drawing.Point(5, 16);
			Image1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			Image1.Name = "Image1";
			Image1.Size = new System.Drawing.Size(32, 32);
			Image1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
			Image1.TabIndex = 20;
			Image1.TabStop = false;
			TabControl1.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right);
			TabControl1.Controls.Add(TabPage1);
			TabControl1.Controls.Add(TabPage2);
			TabControl1.Controls.Add(TabPage3);
			TabControl1.Controls.Add(TabPage4);
			TabControl1.Controls.Add(TabImage);
			TabControl1.Location = new System.Drawing.Point(47, 15);
			TabControl1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			TabControl1.Name = "TabControl1";
			TabControl1.SelectedIndex = 0;
			TabControl1.Size = new System.Drawing.Size(520, 372);
			TabControl1.TabIndex = 21;
			TabPage1.Controls.Add(TableLayoutPanel1);
			TabPage1.Location = new System.Drawing.Point(4, 26);
			TabPage1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			TabPage1.Name = "TabPage1";
			TabPage1.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4);
			TabPage1.Size = new System.Drawing.Size(512, 342);
			TabPage1.TabIndex = 0;
			TabPage1.Text = "Name";
			TabPage1.UseVisualStyleBackColor = true;
			TableLayoutPanel1.ColumnCount = 4;
			TableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
			TableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100f));
			TableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
			TableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
			TableLayoutPanel1.Controls.Add(Label3, 0, 0);
			TableLayoutPanel1.Controls.Add(txtTags, 1, 4);
			TableLayoutPanel1.Controls.Add(txtShortName, 1, 0);
			TableLayoutPanel1.Controls.Add(Label1, 0, 4);
			TableLayoutPanel1.Controls.Add(txtDesc, 1, 3);
			TableLayoutPanel1.Controls.Add(Label4, 0, 1);
			TableLayoutPanel1.Controls.Add(Label6, 0, 3);
			TableLayoutPanel1.Controls.Add(Label2, 0, 2);
			TableLayoutPanel1.Controls.Add(optMinor, 3, 0);
			TableLayoutPanel1.Controls.Add(txtAlternate, 1, 2);
			TableLayoutPanel1.Controls.Add(optMajor, 2, 0);
			TableLayoutPanel1.Controls.Add(txtFullname, 1, 1);
			TableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
			TableLayoutPanel1.Location = new System.Drawing.Point(3, 4);
			TableLayoutPanel1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			TableLayoutPanel1.Name = "TableLayoutPanel1";
			TableLayoutPanel1.RowCount = 5;
			TableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
			TableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
			TableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
			TableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100f));
			TableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
			TableLayoutPanel1.Size = new System.Drawing.Size(506, 334);
			TableLayoutPanel1.TabIndex = 30;
			TabPage2.Controls.Add(txtBio);
			TabPage2.Location = new System.Drawing.Point(4, 26);
			TabPage2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			TabPage2.Name = "TabPage2";
			TabPage2.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4);
			TabPage2.Size = new System.Drawing.Size(512, 342);
			TabPage2.TabIndex = 1;
			TabPage2.Text = "Bio";
			TabPage2.UseVisualStyleBackColor = true;
			TabPage3.Controls.Add(txtNotes);
			TabPage3.Location = new System.Drawing.Point(4, 26);
			TabPage3.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			TabPage3.Name = "TabPage3";
			TabPage3.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4);
			TabPage3.Size = new System.Drawing.Size(512, 342);
			TabPage3.TabIndex = 2;
			TabPage3.Text = "Notes";
			TabPage3.UseVisualStyleBackColor = true;
			TabPage4.Controls.Add(txtGoals);
			TabPage4.Location = new System.Drawing.Point(4, 26);
			TabPage4.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			TabPage4.Name = "TabPage4";
			TabPage4.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4);
			TabPage4.Size = new System.Drawing.Size(512, 342);
			TabPage4.TabIndex = 3;
			TabPage4.Text = "Goals";
			TabPage4.UseVisualStyleBackColor = true;
			TabImage.Controls.Add(Picture1);
			TabImage.Controls.Add(txtImageFile);
			TabImage.Controls.Add(cmdClearPic);
			TabImage.Controls.Add(cmdSelectImage);
			TabImage.Controls.Add(Image2);
			TabImage.Controls.Add(lblImageData);
			TabImage.Location = new System.Drawing.Point(4, 26);
			TabImage.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			TabImage.Name = "TabImage";
			TabImage.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4);
			TabImage.Size = new System.Drawing.Size(512, 342);
			TabImage.TabIndex = 4;
			TabImage.Text = "Picture";
			TabImage.UseVisualStyleBackColor = true;
			cmdClearPic.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right);
			cmdClearPic.BackColor = System.Drawing.SystemColors.Control;
			cmdClearPic.Cursor = System.Windows.Forms.Cursors.Default;
			cmdClearPic.Font = new System.Drawing.Font("Segoe UI", 10f);
			cmdClearPic.ForeColor = System.Drawing.SystemColors.ControlText;
			cmdClearPic.Location = new System.Drawing.Point(426, 56);
			cmdClearPic.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			cmdClearPic.Name = "cmdClearPic";
			cmdClearPic.RightToLeft = System.Windows.Forms.RightToLeft.No;
			cmdClearPic.Size = new System.Drawing.Size(78, 41);
			cmdClearPic.TabIndex = 22;
			cmdClearPic.Text = "Clear";
			cmdClearPic.UseVisualStyleBackColor = true;
			base.AcceptButton = cmdSave;
			base.AccessibleName = "Edit Character";
			base.AutoScaleDimensions = new System.Drawing.SizeF(7f, 17f);
			base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			BackColor = System.Drawing.SystemColors.Control;
			base.CancelButton = cmdCancel;
			base.ClientSize = new System.Drawing.Size(591, 458);
			base.Controls.Add(TabControl1);
			base.Controls.Add(cmdCancel);
			base.Controls.Add(cmdSave);
			base.Controls.Add(Image1);
			Cursor = System.Windows.Forms.Cursors.Default;
			DoubleBuffered = true;
			Font = new System.Drawing.Font("Segoe UI", 10f);
			base.Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
			base.Location = new System.Drawing.Point(3, 20);
			base.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			MinimumSize = new System.Drawing.Size(597, 438);
			base.Name = "frmEditCharacter";
			RightToLeft = System.Windows.Forms.RightToLeft.No;
			base.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
			Text = "Character Sheet";
			((System.ComponentModel.ISupportInitialize)Picture1).EndInit();
			((System.ComponentModel.ISupportInitialize)Image2).EndInit();
			((System.ComponentModel.ISupportInitialize)Image1).EndInit();
			TabControl1.ResumeLayout(false);
			TabPage1.ResumeLayout(false);
			TableLayoutPanel1.ResumeLayout(false);
			TableLayoutPanel1.PerformLayout();
			TabPage2.ResumeLayout(false);
			TabPage3.ResumeLayout(false);
			TabPage4.ResumeLayout(false);
			TabImage.ResumeLayout(false);
			TabImage.PerformLayout();
			ResumeLayout(false);
			PerformLayout();
		}

		public frmEditCharacter()
		{
			base.Load += frmEditCharacter_Load;
			InitializeComponent();
		}

		public void Edit(ref clsProject ProjectClass, int CharID, int WhichTab)
		{
			try
			{
				cProject = ProjectClass;
				CurrentChar = cProject.get_CharByID(CharID);
				DataToForm(ref CurrentChar);
				TabControl1.SelectTab(WhichTab);
				try
				{
					txtShortName.SelectAll();
					txtShortName.Focus();
				}
				catch (Exception ex)
				{
					ProjectData.SetProjectError(ex);
					Exception ex2 = ex;
					ProjectData.ClearProjectError();
				}
				Saved = false;
				txtShortName.SelectAll();
				try
				{
					txtShortName.Focus();
				}
				catch (Exception ex3)
				{
					ProjectData.SetProjectError(ex3);
					Exception ex4 = ex3;
					ProjectData.ClearProjectError();
				}
				ShowDialog();
			}
			catch (Exception ex5)
			{
				ProjectData.SetProjectError(ex5);
				Exception ex6 = ex5;
				clsShared.cLog.AddAction(ex6, MethodBase.GetCurrentMethod());
				ProjectData.ClearProjectError();
			}
		}

		private void cmdCancel_Click(object eventSender, EventArgs eventArgs)
		{
			Saved = false;
			Hide();
		}

		private void cmdSave_Click(object eventSender, EventArgs eventArgs)
		{
			FormToData(ref CurrentChar);
			Saved = true;
			Hide();
		}

		private void cmdSelectImage_Click(object eventSender, EventArgs eventArgs)
		{
			try
			{
				string text = modSubs.SelectAndCopyImage(ref cProject);
				if (Operators.CompareString(text, "", TextCompare: false) != 0)
				{
					txtImageFile.Text = text;
					ref clsProject reference = ref cProject;
					string text2 = txtImageFile.Text;
					PictureBox Picture = Picture1;
					PictureBox Image = Image2;
					TabPage TabPage = TabImage;
					modSubs.DisplayImage(ref reference, text2, ref Picture, ref Image, ref TabPage);
					TabImage = TabPage;
					Image2 = Image;
					Picture1 = Picture;
				}
			}
			catch (Exception ex)
			{
				ProjectData.SetProjectError(ex);
				Exception ex2 = ex;
				clsShared.cLog.AddAction(ex2, MethodBase.GetCurrentMethod());
				ProjectData.ClearProjectError();
			}
		}

		private void frmEditCharacter_Load(object eventSender, EventArgs eventArgs)
		{
			try
			{
				clsShared.cFormFont.SetFormFont(this, clsShared.cSettings.sGet("FormFont", modVariables.DefaultUIFont.Name), clsShared.cSettings.sGet("UIFontSize", modVariables.DefaultUIFont.Size));
				if (Operators.CompareString(clsShared.cLang.CurrentLanguage, "English", TextCompare: false) != 0)
				{
					clsShared.cLang.TranslateForm(this);
				}
				Saved = false;
				clsSettings cSettings = clsShared.cSettings;
				Form Form = this;
				cSettings.ReadWindowSettings("EditChar", ref Form);
			}
			catch (Exception ex)
			{
				ProjectData.SetProjectError(ex);
				Exception ex2 = ex;
				clsShared.cLog.AddAction(ex2, MethodBase.GetCurrentMethod());
				ProjectData.ClearProjectError();
			}
		}

		private void DataToForm(ref clsCharacter cChr)
		{
			//Discarded unreachable code: IL_01aa, IL_01c1, IL_01cc, IL_01dc, IL_024a, IL_024c, IL_0260, IL_0282
			int num = default(int);
			int num3 = default(int);
			try
			{
				ProjectData.ClearProjectError();
				num = 2;
				int num2 = 2;
				txtShortName.Text = cChr.Title;
				num2 = 3;
				txtBio.Text = cChr.Bio;
				num2 = 4;
				txtGoals.Text = cChr.Goals;
				num2 = 5;
				txtNotes.Text = cChr.Notes;
				num2 = 6;
				txtImageFile.Text = cChr.ImageFile;
				num2 = 7;
				txtFullname.Text = cChr.FullName;
				num2 = 8;
				txtAlternate.Text = cChr.AKA;
				num2 = 9;
				txtDesc.Text = cChr.DescText;
				num2 = 10;
				txtTags.Text = cChr.Tags;
				num2 = 11;
				txtShortName.SelectionStart = Strings.Len(txtShortName.Text);
				num2 = 12;
				if (cChr.Major)
				{
					num2 = 13;
					optMajor.Checked = true;
				}
				else
				{
					num2 = 15;
					optMinor.Checked = true;
				}
				num2 = 16;
				ref clsProject reference = ref cProject;
				string text = txtImageFile.Text;
				PictureBox Picture = Picture1;
				PictureBox Image = Image2;
				TabPage TabPage = TabImage;
				modSubs.DisplayImage(ref reference, text, ref Picture, ref Image, ref TabPage);
				TabImage = TabPage;
				Image2 = Image;
				Picture1 = Picture;
				num2 = 17;
				if (Operators.CompareString(cChr.FullName.Trim(), "", TextCompare: false) == 0)
				{
					num2 = 18;
					Text = cChr.Title;
				}
				else
				{
					num2 = 20;
					Text = cChr.Title + " (" + cChr.FullName + ")";
				}
			}
			catch (Exception obj) when ((obj is Exception && num != 0) & (num3 == 0))
			{
				ProjectData.SetProjectError((Exception)obj);
				/*Error near IL_0280: Could not find block for branch target IL_024c*/;
			}
			if (num3 != 0)
			{
				ProjectData.ClearProjectError();
			}
		}

		private void FormToData(ref clsCharacter cChr)
		{
			//Discarded unreachable code: IL_0104, IL_011b, IL_0126, IL_0136, IL_0194, IL_0196, IL_01aa, IL_01cc
			int num = default(int);
			int num3 = default(int);
			try
			{
				ProjectData.ClearProjectError();
				num = 2;
				int num2 = 2;
				cChr.Title = txtShortName.Text;
				num2 = 3;
				cChr.Bio = txtBio.Text;
				num2 = 4;
				cChr.Goals = txtGoals.Text;
				num2 = 5;
				cChr.FullName = txtFullname.Text;
				num2 = 6;
				cChr.Notes = txtNotes.Text;
				num2 = 7;
				cChr.ImageFile = txtImageFile.Text;
				num2 = 8;
				cChr.DescText = txtDesc.Text;
				num2 = 9;
				cChr.AKA = txtAlternate.Text;
				num2 = 10;
				cChr.Tags = txtTags.Text;
				num2 = 11;
				if (optMajor.Checked)
				{
					num2 = 12;
					cChr.Major = true;
				}
				else
				{
					num2 = 14;
					cChr.Major = false;
				}
				num2 = 15;
				cChr.Save();
				num2 = 16;
				clsShared.cSettings.StoreWindowSettings("EditChar", this);
			}
			catch (Exception obj) when ((obj is Exception && num != 0) & (num3 == 0))
			{
				ProjectData.SetProjectError((Exception)obj);
				/*Error near IL_01ca: Could not find block for branch target IL_0196*/;
			}
			if (num3 != 0)
			{
				ProjectData.ClearProjectError();
			}
		}

		private void cmdClearPic_Click(object sender, EventArgs e)
		{
			Image2.Image = null;
			txtImageFile.Text = "";
		}

		private void Image2_Click(object sender, EventArgs e)
		{
		}
	}
}
